
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
        <meta name="layout" content="main" />
        <title>List of participants</title>
    </head>
    <body>
        <div class="undernav">
          <%
          def a = session.access
          a.refresh()
          %>
        </div>
        <div class="body" style="width:98%">
          <div class="undernav">
      <span class="menuButton"><g:link action="show" id="${scheduleInstance?.course?.id}" controller="course">${Inter.printOut('Back to Course',session.language)}</g:link></span>
      <span class="menuButton"><g:link action="show" id="${scheduleInstance?.id}" controller="schedule">${Inter.printOut('Back to Schedule details',session.language)}</g:link></span>
    </div>
            <h1>List of participants for schedule :</h1>
            <h2> ${scheduleInstance?.course?.name} - ${scheduleInstance}</h2>
            <g:if test="${flash.message}">
            <div class="message">${flash.message}</div>
            </g:if>
            <div class="list">
                <table style="table-layout: fixed">
                    <thead>
                        <tr>
                   	        <th>${Inter.printOut('Name',session.language)}</th>
                                <th>${Inter.printOut('LukasId',session.language)}</th>
                                <th>${Inter.printOut('Faculty',session.language)}</th>
                                <th>${Inter.printOut('Department',session.language)}</th>
                                <th>${Inter.printOut('Division',session.language)}</th>
                        </tr>
                    </thead>
                    <tbody>
                    <g:each in="${scheduleInstance.participations}" status="i" var="p">
                        <tr class="${(i % 2) == 0 ? 'odd' : 'even'}">
                            <td>${p?.participant?.firstName} ${p?.participant?.lastName}</td>
                            <td>${p?.lukasId}</td>
                            <td>${p?.faculty}</td>
                            <td>${p?.department}</td>
                            <td>${p?.division}</td>
                        </tr>
                    </g:each>
                    </tbody>
                </table>
            </div>
            <div class="paginateButtons">
                <g:paginate total="${scheduleInstance.participations.size()}" />
            </div>
        </div>

    </body>
</html>
